how to modernize legacy applications